/**
 * Copyright (c) 2016,http://www.365wuliu.com/  All Rights Reserved.
 */
package com.cargo.base.mail;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * MailAuthenticator:发邮件的依赖
 * 
 * @Project Name:cargo
 * @File Name:MailAuthenticator.java
 * @Package Name:com.cargo.common.mail
 * @Creator:Wizard
 * @Date:2016年4月14日下午2:11:32
 */
public class MailAuthenticator extends Authenticator {

	private String username;
	private String password;

	public MailAuthenticator(String username, String password) {
		this.username = username;
		this.password = password;
	}

	protected PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(username, password);
	}

}
